<?php
// +----------------------------------------------------------------------
// | THINKPHP [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2018 http://www.THINKPHP.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 老猫 <THINKPHP@126.com>
// +----------------------------------------------------------------------
namespace app\api\controller;
use EasyWeChat\Factory;
use base\controller\HomeBaseController;

class IndexController extends HomeBaseController
{
    public function index()
    {
        $config = [
    'app_id' => 'wx3cf0f39249eb0xxx',
    'secret' => 'f1c242f4f28f735d4687abb469072xxx',

    'response_type' => 'array',

    'log' => [
        'level' => 'debug',
        'file' => __DIR__.'/wechat.log',
    ],
];

$app = Factory::officialAccount($config);

$response = $app->server->serve();

        // 将响应输出
        //$response->send();
        echo "123";
        exit;
    }
}
